package com.time.toupdate.mapper;

import com.time.toupdate.utils.InsertRunner;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * Author:B
 * Description:
 */
@Component
public class bankimpl {
    @Value("${task.insertTask.insertMonth}")
    private String insertMonth;
    @PostConstruct
    public void init() throws Exception {
        // 开启月用水量插入任务
        if (insertMonth.equals("1")) {
            Thread thread = new Thread(new InsertRunner());
            thread.start();
        }
    }
}
